package com.glodon.paas.account.dao.mysql;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.glodon.paas.account.dao.UserAdviceDao;
import com.glodon.paas.account.dao.domain.UserAdviceEntity;
import com.glodon.paas.account.dao.mapper.UserAdviceEntityMapper;

public class UserAdviceDaoMysqlImpl implements UserAdviceDao {

	@Autowired
	private UserAdviceEntityMapper userAdviceEntityMapper;
	
	@Override
	public int deleteByPrimaryKey(String id) {
		return userAdviceEntityMapper.deleteByPrimaryKey(id);
	}

	@Override
	public int insert(UserAdviceEntity record) {
		return userAdviceEntityMapper.insertSelective(record);
	}

	@Override
	public UserAdviceEntity selectByPrimaryKey(String id) {
		return userAdviceEntityMapper.selectByPrimaryKey(id);
	}

	@Override
	public int updateByPrimaryKey(UserAdviceEntity record) {
		return userAdviceEntityMapper.updateByPrimaryKeySelective(record);
	}

	@Override
	public List<UserAdviceEntity> queryAdvice(String userId, Integer status,
			Integer type, Integer deleteStatus, Integer startIndex,
			Integer count) { 
		return userAdviceEntityMapper.select(
				userId, 
				status,
				type, 
				deleteStatus, 
				startIndex,
				count);
	} 
}
